/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * DialogoDetalleCartera.java
 *
 * Created on 22/11/2012, 11:57:58 PM
 */
package gui;

import javax.swing.JLabel;
import javax.swing.table.DefaultTableCellRenderer;
import modelo.ModeloDatosCredito;

/**
 *
 * @author Administrador
 */
public class DialogoDetalleCartera extends javax.swing.JDialog {

    private ModeloDatosCredito modelo;

    /** Creates new form DialogoDetalleCartera */
    public DialogoDetalleCartera(java.awt.Frame parent, boolean modal, String titulo) {
        super(parent, modal);
        initComponents();
        lblTitulo.setText(titulo);
        modelo = new ModeloDatosCredito();
        tblDatosCredito.setModel(modelo);
        tblDatosCredito.getTableHeader().setReorderingAllowed(false);
        ((DefaultTableCellRenderer) tblDatosCredito.getTableHeader().getDefaultRenderer()).setHorizontalAlignment(JLabel.CENTER);
        this.setSize(700, 280);
        this.setLocationRelativeTo(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        scrDatosCredit = new javax.swing.JScrollPane();
        tblDatosCredito = new javax.swing.JTable();
        lblTitulo = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle(".:: Datos de crédito ::.");

        tblDatosCredito.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        scrDatosCredit.setViewportView(tblDatosCredito);

        getContentPane().add(scrDatosCredit, java.awt.BorderLayout.CENTER);

        lblTitulo.setBackground(new java.awt.Color(41, 101, 148));
        lblTitulo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblTitulo.setForeground(new java.awt.Color(255, 255, 255));
        lblTitulo.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 4, 2, 1));
        lblTitulo.setOpaque(true);
        getContentPane().add(lblTitulo, java.awt.BorderLayout.PAGE_START);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel lblTitulo;
    private javax.swing.JScrollPane scrDatosCredit;
    private javax.swing.JTable tblDatosCredito;
    // End of variables declaration//GEN-END:variables
}
